const vm = new Vue({
	el: "body>article",
	data: {
		params: {
		},
		key: null,
		result: null,
		selectElder: {
			name:"请选择"
		}
	},
	methods: {
		exit: function() {
			axios.post("/exit",{
				elderId:this.selectElder.id,
				exitTime:this.params.exitTime,
				exitReason:this.params.exitReason,
				exitType:this.params.exitType,
				createUserId: window.sessionStorage.getItem("createid")
			}).then(function(resp) {
				if(resp.code === "ok") {
					this.result = resp.data;
					toast("退住成功");
				} else {
					toast(resp.message);
				}
			});
		},
		query: function(pageNo) {
			axios.get("/elder", {
				params: {
					key: this.key,
					pageNo: pageNo,
					pageSize: 10
				}
			}).then(function(resp) {
				if(resp.code === "ok") {
					vm.result = resp.data;
				}
			});
		}
	}
})